package model

type EsOrder struct {
	ID          int32
	OrderSnc    string
	UserId      int64
	PayType     int32
	OrderStatus int32
	AmountPrice float64
}

// 获取索引名和结构体
func (EsOrder) GetIndexName() string {
	return "order"
}

func (EsOrder) GetMapping() string {
	OrderMapping := `{
	"mappings":{
		"properties":{
			"id":{
				"type":"integer",
			},
			"order_snc":{
				"type":"text",
				"analyzer":"ik_max_word"
			},
			"user_id":{
				"type":"integer",
			},
			"pay_type":{
				"type":"integer",
			},
			"order_status":{
				"type":"integer",
			},
			"amount_price":{
				"type":"float",
			}
		}
	}
}`
	return OrderMapping
}
